package hierarchy

import (
	"gitcode.com/G-YT/ANN/server/api/v1"
	"gitcode.com/G-YT/ANN/server/middleware"
	"github.com/gin-gonic/gin"
)

type LevelOneRouter struct {
}

// InitLevelOneRouter 初始化 LevelOne 路由信息
func (s *LevelOneRouter) InitLevelOneRouter(Router *gin.RouterGroup) {
	levelOneRouter := Router.Group("levelOne").Use(middleware.OperationRecord())
	levelOneRouterWithoutRecord := Router.Group("levelOne")
	var levelOneApi = v1.ApiGroupApp.HierarchyApiGroup.LevelOneApi
	{
		levelOneRouter.POST("createLevelOne", levelOneApi.CreateLevelOne)             // 新建LevelOne
		levelOneRouter.DELETE("deleteLevelOne", levelOneApi.DeleteLevelOne)           // 删除LevelOne
		levelOneRouter.DELETE("deleteLevelOneByIds", levelOneApi.DeleteLevelOneByIds) // 批量删除LevelOne
		levelOneRouter.PUT("updateLevelOne", levelOneApi.UpdateLevelOne)              // 更新LevelOne
	}
	{
		levelOneRouterWithoutRecord.GET("findLevelOne", levelOneApi.FindLevelOne)                 // 根据ID获取LevelOne
		levelOneRouterWithoutRecord.GET("getLevelOneList", levelOneApi.GetLevelOneList)           // 获取LevelOne列表
		levelOneRouterWithoutRecord.GET("getLearnLevelOneList", levelOneApi.GetLearnLevelOneList) // 获取学习文章一级列表
	}
}
